10944e
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hive.llap.cache;
 
+import org.apache.hadoop.hive.llap.cache.SerDeLowLevelCacheImpl.LlapSerDeDataBuffer;
 import org.apache.hadoop.hive.llap.io.metadata.OrcFileEstimateErrors;
 import org.apache.hadoop.hive.llap.io.metadata.OrcFileMetadata;
 import org.apache.hadoop.hive.llap.io.metadata.OrcMetadataCache;
@@ -44,13 +45,14 @@
public void notifyEvicted(LlapCacheableBuffer buffer) {
     buffer.notifyEvicted(this); // This will call one of the specific notifyEvicted overloads.
   }
 
+  public void notifyEvicted(LlapSerDeDataBuffer buffer) {
+    serdeCache.notifyEvicted(buffer);
+    allocator.deallocateEvicted(buffer);
+   
+  }
+
   public void notifyEvicted(LlapDataBuffer buffer) {
-    // Note: we don't know which cache this is from, so we notify both. They can noop if they
-    //       want to find the buffer in their structures and can't.
     dataCache.notifyEvicted(buffer);
-    if (serdeCache != null) {
-      serdeCache.notifyEvicted(buffer);
-    }
     allocator.deallocateEvicted(buffer);
   }
 
